import request from '@/axios'

export const getRolePageListApi = (data) => {
  return request.post({ url: '/api/role/pageList', data })
}

export const getRoleListApi = (data) => {
  return request.post({ url: '/api/role/list', data })
}

export const saveRole = (data) => {
  return request.post({ url: '/api/role/saveRole', data })
}

export const updateRole = (data) => {
  return request.post({ url: '/api/role/updateRole', data })
}

export const deleteRole = (roleId: string) => {
  return request.post({ url: '/api/role/deleteRole', data: { id: roleId } })
}

export const roleDetail = (roleId: string) => {
  return request.post({ url: '/api/role/roleDetail', data: { id: roleId } })
}
